
#include <ukapi.h>

dword_t task1( ptask_parameter_t param )
{

	do
	{
		output_string( "hello task 1" );
		task_sleep( 1000 );
	} while ( 1 );
}

result_t myapp()
{
	task_t t;

	output_string( "hello myapp" );

	task_create(&t, task_state_suspended_e, task1, null );

	output_string( "task_create done" );

	task_resume( &t );

	// sould never return...
	return result_ok_e;
}

int main( int argc, char ** argv )
{
	application_t app;

	system_init();

	app.entry_point = (application_entry_point_t) myapp;

	system_start( &app );

	// should never get here...

	return 0;
}
